<template>
  <table class="table table-bordered table-stripped">
    <!-- 表格标题区域 -->
    <thead>
      <tr>
        <th>id</th>
        <th>商品名称</th>
        <th>标签</th>
        <th>价格</th>
        <!-- <slot name="header" /> -->
      </tr>
    </thead>
    <!-- 表格主体区域 -->
    <tbody>
      <tr
        v-for="obj in arr"
        :key="obj.id"
      >
        <td>{{ obj.id }}</td>
        <td>{{ obj.goods_name }}</td>
        <td>{{ obj.tags }}</td>
        <td>{{ obj.goods_price }}</td>
        <!-- <slot name="body" :row="obj" /> -->
      </tr>
    </tbody>
  </table>
</template>

<script>
export default {
  name: 'MyTable',
  props: {
    arr: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style scoped lang="scss">
.my-goods-list {
  .badge {
    margin-right: 5px;
  }
}
</style>
